package DControl;

import java.awt.*;
import java.awt.event.MouseEvent;

import javax.swing.*;
public class DLabel extends DComponent implements DMouseListener{
	public DLabel()
	{
		init();
	}
	
	public DLabel(String text)
	{
		init();
		this.text = text;
		
	}
	
	public DLabel(int x,int y,String text)
	{
		init();
		this.x = x;
		this.y = y;
		this.text = text;
		
	}
	
	public void init()
	{
		text = "Label";
		color = Color.black;
		Class = "DLabel";
		
	}
	
	 public void paintComponent(Graphics g)
	 {
		 super.paintComponent(g);
		 g.setColor(color);
		 g.drawString(text, x, y);
		 setResponseRect(x, y, x + stringWidth, y + stringHeight);
	 }
	 
     public void mouseEntered(MouseEvent e){}
   	 
   	 public void mouseExited(MouseEvent e){}
   	 
   	 public void mousePressed(MouseEvent e) 
   	 {
   		 System.out.println("Label");
 
   	 }
   	 
   	 public void mouseReleased(MouseEvent e){}
   	 
   	 public void mouseClicked(MouseEvent e){}
	
}
